package com.lkx.farmershop.model.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * (Comments)实体类
 *
 * @author makejava
 * @since 2025-02-10 15:19:22
 */
@Getter
@Setter
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Comments implements Serializable {
    private static final long serialVersionUID = 917043983889037475L;
    /**
     * 主键
     */
    @TableId
    private Long id;
    /**
     * 对应组团的id
     */
    private Long tuanId;
    /**
     * 评论内容
     */
    private String commentsContent;
    /**
     * 父评论id
     */
    private Long parentId = -1L;
    /**
     * 评论发布者id
     */
    private Long userId;
    /**
     * 评论发布时间
     */
    private LocalDateTime commentsTime;
    /**
     * 回复的用户的id
     */
    private Long replyUserId = -1L;

    public Comments(Long tuanId, String commentsContent, Long parentId, Long userId, LocalDateTime commentsTime, Long replyUserId) {
        this.tuanId = tuanId;
        this.commentsContent = commentsContent;
        this.parentId = parentId;
        this.userId = userId;
        this.commentsTime = commentsTime;
        this.replyUserId = replyUserId;
    }
}

